#ifndef TCLIENTTHREAD_H
#define TCLIENTTHREAD_H

#include <QtNetwork>

class TClientThread : public QThread
{
    Q_OBJECT
public:
    TClientThread(QObject* parent=0);
    bool connectToHost();
    bool readData();
    bool writeData();
    void run();

public slots:
    void exchangeData();

signals:
    void error(QAbstractSocket::SocketError error);

private:
    QTcpSocket* socket;
    char*       host;
    qint64      port;
    QByteArray  block;
};

#endif // TCLIENTTHREAD_H
